import request from '@/utils/request'

// 查全部
export function getAllDepartment() {
    return request({
        url: '/company/department'
    })
}

// 获取部门详情列表
export function getSomeDepart() {
    return request({
        url: '/sys/user/simple'
    })
}

// 新增部门
export function addNewDepart(data) {
    return request({
        url: '/company/department',
        method: 'POST',
        data
    })
}

// id 查角色详情
export function getByIdDepart(id) {
    return request({
        url: `/company/department/${id}`
    })
}

// id 修改角色详情
export function updataByIdDepart(id, data) {
    return request({
        url: `/company/department/${id}`,
        method: 'PUT',
        data
    })
}

// 删除
export function deleteByIdDepart(id) {
    return request({
        url: `/company/department/${id}`,
        method: 'DELETE'
    })
}

// 新增员工
export function addEmployee(data) {
    return request({
        url: '/sys/user',
        method: 'post',
        data
    })
}
